79 research outputs found

    Bridging the Gap between Machine and Language using First-Class Building Blocks

    Get PDF
    High-performance virtual machines (VMs) are increasingly reused for programming languages for which they were not initially designed. Unfortunately, VMs are usually tailored to specific languages, offer only a very limited interface to running applications, and are closed to extensions. As a consequence, extensions required to support new languages often entail the construction of custom VMs, thus impacting reuse, compatibility and performance. Short of building a custom VM, the language designer has to choose between the expressiveness and the performance of the language. In this dissertation we argue that the best way to open the VM is to eliminate it. We present Pinocchio, a natively compiled Smalltalk, in which we identify and reify three basic building blocks for object-oriented languages. First we define a protocol for message passing similar to calling conventions, independent of the actual message lookup mechanism. The lookup is provided by a self-supporting runtime library written in Smalltalk and compiled to native code. Since it unifies the meta- and base-level we obtain a metaobject protocol (MOP). Then we decouple the language-level manipulation of state from the machine-level implementation by extending the structural reflective model of the language with object layouts, layout scopes and slots. Finally we reify behavior using AST nodes and first-class interpreters separate from the low-level language implementation. We describe the implementations of all three first-class building blocks. For each of the blocks we provide a series of examples illustrating how they enable typical extensions to the runtime, and we provide benchmarks validating the practicality of the approaches

    Bridging the Gap between Machine and Language using First-Class Building Blocks

    Get PDF
    High-performance virtual machines (VMs) are increasingly reused for programming languages for which they were not initially designed. Unfortunately, VMs are usually tailored to specific languages, offer only a very limited interface to running applications, and are closed to extensions. As a consequence, extensions required to support new languages often entail the construction of custom VMs, thus impacting reuse, compatibility and performance. Short of building a custom VM, the language designer has to choose between the expressiveness and the performance of the language. In this dissertation we argue that the best way to open the VM is to eliminate it. We present Pinocchio, a natively compiled Smalltalk, in which we identify and reify three basic building blocks for object-oriented languages. First we define a protocol for message passing similar to calling conventions, independent of the actual message lookup mechanism. The lookup is provided by a self-supporting runtime library written in Smalltalk and compiled to native code. Since it unifies the meta- and base-level we obtain a metaobject protocol (MOP). Then we decouple the language-level manipulation of state from the machine-level implementation by extending the structural reflective model of the language with object layouts, layout scopes and slots. Finally we reify behavior using AST nodes and first-class interpreters separate from the low-level language implementation. We describe the implementations of all three first-class building blocks. For each of the blocks we provide a series of examples illustrating how they enable typical extensions to the runtime, and we provide benchmarks validating the practicality of the approaches

    Overtopping reduction for harbor quays under very oblique waves attack

    Get PDF

    Characterization of overtopping waves on sea dikes with gentle and shallow foreshores

    Get PDF
    Due to ongoing climate change, overtopping risk is increasing. In order to have effective countermeasures, it is useful to understand overtopping processes in details. In this study overtopping flow on a dike with gentle and shallow foreshores are investigated using a non-hydrostatic wave-flow model, SWASH (an acronym of Simulating WAves till SHore). The SWASH model in 2DV (i.e., flume like configuration) is first validated using the data of long crested wave cases with second order wave generation in the physical model test conducted. After that it is used to produce overtopping flow in different wave conditions and bathymetries. The results indicated that the overtopping risk is better characterized by the time dependent h (overtopping flow depth) and u (overtopping flow velocity) instead of hmax (maximum overtopping flow depth) and umax (maximum overtopping flow velocity), which led to overestimation of the risk. The time dependent u and h are strongly influenced by the dike configuration, namely by the promenade width and the existence of a vertical wall on the promenade: the simulation shows that the vertical wall induces seaward velocity on the dike which might be an extra risk during extreme events.This research was part of the CREST (Climate REsilient CoaST) project (http://www.crestproject.be/en), funded by the Flemish Agency for Innovation by Science and Technology, grant number 150028. Corrado Altomare acknowledges funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Sklodowska-Curie grant agreement No.: 792370.Peer ReviewedPostprint (published version

    Flexible Object Layouts: enabling lightweight language extensions by intercepting slot access

    Get PDF
    International audienceProgramming idioms, design patterns and application li- braries often introduce cumbersome and repetitive boiler- plate code to a software system. Language extensions and external DSLs (domain specific languages) are sometimes introduced to reduce the need for boilerplate code, but they also complicate the system by introducing the need for lan- guage dialects and inter-language mediation. To address this, we propose to extend the structural reflec- tive model of the language with object layouts, layout scopes and slots. Based on the new reflective language model we can 1) provide behavioral hooks to object layouts that are triggered when the fields of an object are accessed and 2) simplify the implementation of state-related language exten- sions such as stateful traits. By doing this we show how many idiomatic use cases that normally require boilerplate code can be more effectively supported. We present an implementation in Smalltalk, and illustrate its usage through a series of extended examples
    • …
    corecore